<script setup>
import {ref} from "vue"

const userid = ref(2)
</script>

<template>
  <div class="text-msg">
    <img class="head" src="@/assets/order-msg.png" alt="">
    <div class="msg-text" :class="{mine: userid === 1}">
      <p class="name" v-if="userid !== 1">订单助手</p>
      <div class="file" :class="{mine: userid === 1}">
        <div class="content">
          <h4>有1个支付订单</h4>
          <p>买家「刘策北」下单了你的服务「讯飞高级设计师/7年视觉设计经验，擅长B端/官网/app设计」支付金额（900元）</p>
          <router-link to="#">查看详情</router-link>
        </div>
      </div>
    </div>
  </div>
</template>

<style scoped lang="scss">
.text-msg{
  display: flex;
  margin-bottom: 26px;
  .head{
    width: 40px;
    height: 40px;
    margin-right: 8px;
    border-radius: 50%;
  }
  .msg-text{
    width: 100%;
    .name{
      color: rgba(25,30,40,0.36);
      font-size: 12px;
      margin-bottom: 4px;
    }
    .text{
      display: inline-block;
      background: #fff;
      padding: 12px 20px;
      border-radius: 0 12px 12px 12px;
      max-width: 80%;
      box-shadow: 0 4px 12px -2px rgba(11,13,18,0.06);
    }
  }
  .file{
    display: flex;
    .content{
      width: 480px;
      background: #FFFFFF;
      border-radius: 12px 12px 12px 12px;
      border: 1px solid rgba(25,30,40,0.08);
      padding: 16px;
      h4{
        font-size: 15px;
        color: #191E28;
        margin-bottom: 10px;
      }
      p{
        font-size: 13px;
        color: #191E28;
        margin-bottom: 16px;
      }
      a{
        display: block;
        width: 108px;
        height: 38px;
        background: #FFFFFF;
        border-radius: 8px 8px 8px 8px;
        border: 1px solid rgba(25,30,40,0.08);
        text-align: center;
        line-height: 38px;
        color: #191E28;
        text-decoration: none;
      }
    }
  }
}
</style>